#include "StdAfx.h"
#include "KnowledgePledgetLoanModel.h"


CKnowledgePledgetLoanModel::CKnowledgePledgetLoanModel(void)
{
	m_id = 0;
}

CKnowledgePledgetLoanModel::~CKnowledgePledgetLoanModel(void)
{
}

void CKnowledgePledgetLoanModel::parseFromJson(Json::Value& jsonData)
{
	if (!jsonData["id"].isNull())
	{
		m_id = jsonData["id"].asInt();
	}
	CUtils::getJsonStringField(jsonData, "name", m_name);
	CUtils::getJsonStringField(jsonData, "product", m_product);
	CUtils::getJsonStringField(jsonData, "loanAmount", m_loanAmount);
	CUtils::getJsonStringField(jsonData, "percentage", m_percentage);
	CUtils::getJsonStringField(jsonData, "interestRate", m_interestRate);
	CUtils::getJsonStringField(jsonData, "houseAge", m_houseAge);
	CUtils::getJsonStringField(jsonData, "deadline", m_deadline);
	CUtils::getJsonStringField(jsonData, "transferOwnership", m_transferOwnership);
	CUtils::getJsonStringField(jsonData, "approval", m_approval);
	CUtils::getJsonStringField(jsonData, "censusRegister", m_censusRegister);
	CUtils::getJsonStringField(jsonData, "age", m_age);
	CUtils::getJsonStringField(jsonData, "compangeAge", m_compangeAge);
	CUtils::getJsonStringField(jsonData, "credit", m_credit);
	CUtils::getJsonStringField(jsonData, "bankFlow", m_bankFlow);
	CUtils::getJsonStringField(jsonData, "extendLoanTm", m_extendLoanTm);
	CUtils::getJsonStringField(jsonData, "valuationFee", m_valuationFee);
	CUtils::getJsonStringField(jsonData, "pledgeZy", m_pledgeZy);
	CUtils::getJsonStringField(jsonData, "useReturnedMoney", m_useReturnedMoney);
	CUtils::getJsonStringField(jsonData, "memo", m_memo);
	CUtils::getJsonStringField(jsonData, "consumerCredit", m_consumerCredit);
	CUtils::getJsonStringField(jsonData, "businessLoans", m_businessLoans);
	CUtils::getJsonStringField(jsonData, "cityName", m_cityName);
}

